﻿using Mes.Domain.BoundedContext.EntityBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mes.Domain.BoundedContext.Entities.WorkOrders
{
    public class JobExec : NoIdEntityBase
    {
        public JobExec() { }

        public JobExec(int entId)
        {
            Ent_Id = entId;
            Must_Complete_Steps = true;
            Must_Prod_Reqd_Qty = true;
        }

        public int Ent_Id { get; set; }

        public int Job_Pos { get; set; }

        public bool Next_Job_Only { get; set; }

        public bool Item_Based_Desc { get; set; }

        public string? Job_End_Confirm_Msg { get; set; }

        public int? Def_To_Ent_Id { get; set; }

        public int? Def_Reject_Ent_Id { get; set; }

        public int? Def_From_Ent_Id { get; set; }

        public int Def_Prod_Reas_Cd { get; set; }

        public int? Def_Cons_Reas_Cd { get; set; }

        public string? Def_Lot_No { get; set; }

        public string? Def_Sublot_No { get; set; }

        public bool Autoload_Job_Specs { get; set; }

        public int Auto_Seq_Start_Option { get; set; }

        public int Auto_Job_Start_Option { get; set; }

        public int Auto_Job_End_Option { get; set; }

        public bool Incl_Class_Reas { get; set; }

        public bool Must_Complete_Steps { get; set; }

        public bool Must_Prod_Reqd_Qty { get; set; }

        public bool Local_Movable_Cons_Ent { get; set; }

        public bool Local_Movable_Prod_Ent { get; set; }

        public bool Run_Without_Operator { get; set; }

        public bool Apply_Post_Exec_Fc_Counts { get; set; }

        public bool Suppress_Start_Qty_Prompt { get; set; }

        public bool Allow_Zero_Qty_Split { get; set; }

        public bool Auto_Alloc_Qty_To_Running_Job { get; set; }

        public string? Cur_Wo_Id { get; set; }

        public string? Cur_Oper_Id { get; set; }

        public int? Cur_Step_No { get; set; }

        public int? Cur_Step_Grp_Id { get; set; }

        public DateTime? Cur_Step_Start { get; set; }

        public string? Spare1 { get; set; }

        public string? Spare2 { get; set; }

        public string? Spare3 { get; set; }

        public string? Spare4 { get; set; }

        public string? Last_Edit_Comment { get; set; }

        public string? Last_Edit_By { get; set; } = String.Empty;

        public DateTime Last_Edit_At { get; set; } = DateTime.Now;

        public int Row_Id { get; set; }
    }
}
